// Fill out your copyright notice in the Description page of Project Settings.


#include "UserWidget/WidgetComponent/SingleDirectionWidget.h"
#include "Components/TextBlock.h"
#include "Kismet/KismetStringLibrary.h"

void USingleDirectionWidget::NativePreConstruct() {
	Super::NativePreConstruct();
	FString LocName = Direction.Name.ToString();
	LocName=UKismetStringLibrary::LeftChop(LocName, LocName.Len() - 2);
	LocName = UKismetStringLibrary::ToUpper(LocName);
	Text->SetText(FText::FromString(LocName));
}

void USingleDirectionWidget::ContructWidget(FDirections LocDirection) {
	Direction = LocDirection;
}